{"ast":null,"code":"import { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value) {\n  var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  if (process.env.NODE_ENV !== 'production') {\n    if (value < min || value > max) {\n      console.error(\"MUI: The value provided \".concat(value, \" is out of range [\").concat(min, \", \").concat(max, \"].\"));\n    }\n  }\n  return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\nexport function hexToRgb(color) {\n  color = color.slice(1);\n  var re = new RegExp(\".{1,\".concat(color.length >= 6 ? 2 : 1, \"}\"), 'g');\n  var colors = color.match(re);\n  if (colors && colors[0].length === 1) {\n    colors = colors.map(function (n) {\n      return n + n;\n    });\n  }\n  return colors ? \"rgb\".concat(colors.length === 4 ? 'a' : '', \"(\").concat(colors.map(function (n, index) {\n    return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n  }).join(', '), \")\") : '';\n}\nfunction intToHex(int) {\n  var hex = int.toString(16);\n  return hex.length === 1 ? \"0\".concat(hex) : hex;\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\nexport function decomposeColor(color) {\n  // Idempotent\n  if (color.type) {\n    return color;\n  }\n  if (color.charAt(0) === '#') {\n    return decomposeColor(hexToRgb(color));\n  }\n  var marker = color.indexOf('(');\n  var type = color.substring(0, marker);\n  if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n    throw new Error(process.env.NODE_ENV !== \"production\" ? \"MUI: Unsupported `\".concat(color, \"` color.\\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\") : _formatMuiErrorMessage(9, color));\n  }\n  var values = color.substring(marker + 1, color.length - 1);\n  var colorSpace;\n  if (type === 'color') {\n    values = values.split(' ');\n    colorSpace = values.shift();\n    if (values.length === 4 && values[3].charAt(0) === '/') {\n      values[3] = values[3].slice(1);\n    }\n    if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n      throw new Error(process.env.NODE_ENV !== \"production\" ? \"MUI: unsupported `\".concat(colorSpace, \"` color space.\\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.\") : _formatMuiErrorMessage(10, colorSpace));\n    }\n  } else {\n    values = values.split(',');\n  }\n  values = values.map(function (value) {\n    return parseFloat(value);\n  });\n  return {\n    type: type,\n    values: values,\n    colorSpace: colorSpace\n  };\n}\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\n\nexport var colorChannel = function colorChannel(color) {\n  var decomposedColor = decomposeColor(color);\n  return decomposedColor.values.slice(0, 3).map(function (val, idx) {\n    return decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? \"\".concat(val, \"%\") : val;\n  }).join(' ');\n};\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\nexport function recomposeColor(color) {\n  var type = color.type,\n    colorSpace = color.colorSpace;\n  var values = color.values;\n  if (type.indexOf('rgb') !== -1) {\n    // Only convert the first 3 values to int (i.e. not alpha)\n    values = values.map(function (n, i) {\n      return i < 3 ? parseInt(n, 10) : n;\n    });\n  } else if (type.indexOf('hsl') !== -1) {\n    values[1] = \"\".concat(values[1], \"%\");\n    values[2] = \"\".concat(values[2], \"%\");\n  }\n  if (type.indexOf('color') !== -1) {\n    values = \"\".concat(colorSpace, \" \").concat(values.join(' '));\n  } else {\n    values = \"\".concat(values.join(', '));\n  }\n  return \"\".concat(type, \"(\").concat(values, \")\");\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\nexport function rgbToHex(color) {\n  // Idempotent\n  if (color.indexOf('#') === 0) {\n    return color;\n  }\n  var _decomposeColor = decomposeColor(color),\n    values = _decomposeColor.values;\n  return \"#\".concat(values.map(function (n, i) {\n    return intToHex(i === 3 ? Math.round(255 * n) : n);\n  }).join(''));\n}\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\nexport function hslToRgb(color) {\n  color = decomposeColor(color);\n  var _color = color,\n    values = _color.values;\n  var h = values[0];\n  var s = values[1] / 100;\n  var l = values[2] / 100;\n  var a = s * Math.min(l, 1 - l);\n  var f = function f(n) {\n    var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n    return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n  };\n  var type = 'rgb';\n  var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n  if (color.type === 'hsla') {\n    type += 'a';\n    rgb.push(values[3]);\n  }\n  return recomposeColor({\n    type: type,\n    values: rgb\n  });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\nexport function getLuminance(color) {\n  color = decomposeColor(color);\n  var rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n  rgb = rgb.map(function (val) {\n    if (color.type !== 'color') {\n      val /= 255; // normalized\n    }\n\n    return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n  }); // Truncate at 3 digits\n\n  return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\nexport function getContrastRatio(foreground, background) {\n  var lumA = getLuminance(foreground);\n  var lumB = getLuminance(background);\n  return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function alpha(color, value) {\n  color = decomposeColor(color);\n  value = clamp(value);\n  if (color.type === 'rgb' || color.type === 'hsl') {\n    color.type += 'a';\n  }\n  if (color.type === 'color') {\n    color.values[3] = \"/\".concat(value);\n  } else {\n    color.values[3] = value;\n  }\n  return recomposeColor(color);\n}\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function darken(color, coefficient) {\n  color = decomposeColor(color);\n  coefficient = clamp(coefficient);\n  if (color.type.indexOf('hsl') !== -1) {\n    color.values[2] *= 1 - coefficient;\n  } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n    for (var i = 0; i < 3; i += 1) {\n      color.values[i] *= 1 - coefficient;\n    }\n  }\n  return recomposeColor(color);\n}\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function lighten(color, coefficient) {\n  color = decomposeColor(color);\n  coefficient = clamp(coefficient);\n  if (color.type.indexOf('hsl') !== -1) {\n    color.values[2] += (100 - color.values[2]) * coefficient;\n  } else if (color.type.indexOf('rgb') !== -1) {\n    for (var i = 0; i < 3; i += 1) {\n      color.values[i] += (255 - color.values[i]) * coefficient;\n    }\n  } else if (color.type.indexOf('color') !== -1) {\n    for (var _i = 0; _i < 3; _i += 1) {\n      color.values[_i] += (1 - color.values[_i]) * coefficient;\n    }\n  }\n  return recomposeColor(color);\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function emphasize(color) {\n  var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;\n  return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}","map":{"version":3,"names":["formatMuiErrorMessage","_formatMuiErrorMessage","clamp","value","min","max","process","env","NODE_ENV","console","error","Math","hexToRgb","color","slice","re","RegExp","length","colors","match","map","n","index","parseInt","round","join","intToHex","int","hex","toString","decomposeColor","type","charAt","marker","indexOf","substring","Error","values","colorSpace","split","shift","parseFloat","colorChannel","decomposedColor","val","idx","recomposeColor","i","rgbToHex","hslToRgb","h","s","l","a","f","k","rgb","push","getLuminance","Number","toFixed","getContrastRatio","foreground","background","lumA","lumB","alpha","darken","coefficient","lighten","emphasize"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/system/esm/colorManipulator.js"],"sourcesContent":["import { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value, min = 0, max = 1) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (value < min || value > max) {\n      console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n    }\n  }\n\n  return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nexport function hexToRgb(color) {\n  color = color.slice(1);\n  const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n  let colors = color.match(re);\n\n  if (colors && colors[0].length === 1) {\n    colors = colors.map(n => n + n);\n  }\n\n  return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n    return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n  }).join(', ')})` : '';\n}\n\nfunction intToHex(int) {\n  const hex = int.toString(16);\n  return hex.length === 1 ? `0${hex}` : hex;\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\n\nexport function decomposeColor(color) {\n  // Idempotent\n  if (color.type) {\n    return color;\n  }\n\n  if (color.charAt(0) === '#') {\n    return decomposeColor(hexToRgb(color));\n  }\n\n  const marker = color.indexOf('(');\n  const type = color.substring(0, marker);\n\n  if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n    throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : _formatMuiErrorMessage(9, color));\n  }\n\n  let values = color.substring(marker + 1, color.length - 1);\n  let colorSpace;\n\n  if (type === 'color') {\n    values = values.split(' ');\n    colorSpace = values.shift();\n\n    if (values.length === 4 && values[3].charAt(0) === '/') {\n      values[3] = values[3].slice(1);\n    }\n\n    if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n      throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : _formatMuiErrorMessage(10, colorSpace));\n    }\n  } else {\n    values = values.split(',');\n  }\n\n  values = values.map(value => parseFloat(value));\n  return {\n    type,\n    values,\n    colorSpace\n  };\n}\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\n\nexport const colorChannel = color => {\n  const decomposedColor = decomposeColor(color);\n  return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\nexport function recomposeColor(color) {\n  const {\n    type,\n    colorSpace\n  } = color;\n  let {\n    values\n  } = color;\n\n  if (type.indexOf('rgb') !== -1) {\n    // Only convert the first 3 values to int (i.e. not alpha)\n    values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n  } else if (type.indexOf('hsl') !== -1) {\n    values[1] = `${values[1]}%`;\n    values[2] = `${values[2]}%`;\n  }\n\n  if (type.indexOf('color') !== -1) {\n    values = `${colorSpace} ${values.join(' ')}`;\n  } else {\n    values = `${values.join(', ')}`;\n  }\n\n  return `${type}(${values})`;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\nexport function rgbToHex(color) {\n  // Idempotent\n  if (color.indexOf('#') === 0) {\n    return color;\n  }\n\n  const {\n    values\n  } = decomposeColor(color);\n  return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\nexport function hslToRgb(color) {\n  color = decomposeColor(color);\n  const {\n    values\n  } = color;\n  const h = values[0];\n  const s = values[1] / 100;\n  const l = values[2] / 100;\n  const a = s * Math.min(l, 1 - l);\n\n  const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n\n  let type = 'rgb';\n  const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n  if (color.type === 'hsla') {\n    type += 'a';\n    rgb.push(values[3]);\n  }\n\n  return recomposeColor({\n    type,\n    values: rgb\n  });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\nexport function getLuminance(color) {\n  color = decomposeColor(color);\n  let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n  rgb = rgb.map(val => {\n    if (color.type !== 'color') {\n      val /= 255; // normalized\n    }\n\n    return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n  }); // Truncate at 3 digits\n\n  return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\nexport function getContrastRatio(foreground, background) {\n  const lumA = getLuminance(foreground);\n  const lumB = getLuminance(background);\n  return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function alpha(color, value) {\n  color = decomposeColor(color);\n  value = clamp(value);\n\n  if (color.type === 'rgb' || color.type === 'hsl') {\n    color.type += 'a';\n  }\n\n  if (color.type === 'color') {\n    color.values[3] = `/${value}`;\n  } else {\n    color.values[3] = value;\n  }\n\n  return recomposeColor(color);\n}\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function darken(color, coefficient) {\n  color = decomposeColor(color);\n  coefficient = clamp(coefficient);\n\n  if (color.type.indexOf('hsl') !== -1) {\n    color.values[2] *= 1 - coefficient;\n  } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n    for (let i = 0; i < 3; i += 1) {\n      color.values[i] *= 1 - coefficient;\n    }\n  }\n\n  return recomposeColor(color);\n}\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function lighten(color, coefficient) {\n  color = decomposeColor(color);\n  coefficient = clamp(coefficient);\n\n  if (color.type.indexOf('hsl') !== -1) {\n    color.values[2] += (100 - color.values[2]) * coefficient;\n  } else if (color.type.indexOf('rgb') !== -1) {\n    for (let i = 0; i < 3; i += 1) {\n      color.values[i] += (255 - color.values[i]) * coefficient;\n    }\n  } else if (color.type.indexOf('color') !== -1) {\n    for (let i = 0; i < 3; i += 1) {\n      color.values[i] += (1 - color.values[i]) * coefficient;\n    }\n  }\n\n  return recomposeColor(color);\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function emphasize(color, coefficient = 0.15) {\n  return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}"],"mappings":"AAAA,SAASA,qBAAqB,IAAIC,sBAAsB,QAAQ,YAAY;;AAE5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,KAAK,CAACC,KAAK,EAAoB;EAAA,IAAlBC,GAAG,uEAAG,CAAC;EAAA,IAAEC,GAAG,uEAAG,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